import request from '@/utils/request.js'

// 获取列表
export const getdeviceListApi = (params)=>{
    return request({
        url:'/device/index',
        method:'get',
        params
    })
}

// 获取详情
export const getdeviceInfoApi = (id)=>{
    return request({
        url:'/device/index/'+id,
        method:'get',
    })
}

// 新增数据
export const adddeviceApi = (data)=>{
    return request({
        url:'/device/index',
        method:'post',
        data
    })
}

// 修改数据
export const editdeviceyApi = (data)=>{
  return request({
      url:'/device/index/'+data.id,
      method:'put',
      data
  })
}

// 删除
export const deldeviceApi = (id)=>{
  return request({
      url:'/device/index/'+id,
      method:'delete'
  })
}
